<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<span id="${uuid}" style="display: none"></span>

<div data-id="accordion">
    <div title="流程提交">
        <div data-id="process">

        </div>
        <div class="mt10" style="padding: 10px;">
            <a href="javascript:void(0)" data-id="goToChooseProcess" iconCls="fa fa-plus fa-lg">添加流程</a>
        </div>
        <form data-id="baseForm">
            <table border="1" cellpadding="0" cellspacing="0" class="hydra-table" style="margin-top: 20px;">
                <tr class="hydra-tr-bg">
                    <td class="hydra-left"><span class="nes-tip">*</span>名称：</td>
                    <td class="hydra-right">
                        <input name="title" data-id="title" class="easyui-validatebox hydra-input-width" data-options="required:true"
                               maxlength="20" placeholder="填一个最优流程的名字"/></td>
                </tr>
                <tr class="hydra-tr-bg">
                    <td class="hydra-left"><span class="nes-tip">*</span>推荐原因：</td>
                    <td class="hydra-right"><textarea
                            data-id="reason" name="reason"
                            class="easyui-validatebox hydra-textarea hydra-input-width" draggable="false"
                            data-options="required:true,validType:['normalChar','length[0,200]']"
                            placeholder="填写推荐的原因.."></textarea></td>
                </tr>
                <tr class="hydra-tr-bg">
                    <td class="hydra-left">备注：</td>
                    <td class="hydra-right"><textarea
                            data-id="remark" name="remark"
                            class="easyui-validatebox hydra-textarea hydra-input-width" draggable="false"
                            data-options="validType:['normalChar','length[0,200]']"
                            placeholder="备注.."></textarea></td>
                </tr>
            </table>
        </form>
    </div>
    <div title="选择工艺模板">
        <c:forEach items="${groups}" var="group">
            <div class="best-holder">
                <h3>${group.moduleName}</h3>

                <div class="lab-spr"></div>
                <div class="lab-box best-template">
                    <c:forEach items="${group.processTemplates}" var="template">
                        <dl data-id="lab-item" class="lab-item <c:if test="${template.bestTotal ne 0}">with-best</c:if>" data-title="${template.processName}"
                            data-process-id="${template.id}"
                            data-record-total="${empty template.records ? 0 : fn:length(template.records)}"
                            data-href="${pageContext.request.contextPath}/app/api/process/detail?uuid=${uuid}&id=${template.id}">
                            <dt><img style="width: 64px;height: 64px"
                                     src="${pageContext.request.contextPath}/print/${template.processCover}"></dt>
                            <dd class="lab-name" data-id="lab-title"
                                title="${template.processName}">${template.processName}</dd>
                            <dd style="display: none">${template.remark}</dd>
                            <dd class="best-total" title="包含${template.bestTotal}个最优参数可用选择">${template.bestTotal}</dd>
                        </dl>
                    </c:forEach>
                </div>
            </div>
        </c:forEach>
    </div>
</div>
<script language="javascript">
    seajs.use("apps/best/process", function (page) {
        page.add("${pageContext.request.contextPath}", "${uuid}");
    })
</script>

